package com.xckj.teacher.ui.adapter

import android.annotation.SuppressLint
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.xckj.teacher.R
import com.xckj.teacher.bean.ClassBean

/**
 * @Describe: 班级列表
 * @Date: 2024/4/11 22:29
 */
class ClassListAdapter(data: MutableList<ClassBean>) : BaseQuickAdapter<ClassBean, BaseViewHolder>(
    R.layout.item_class_list, data
) {

    override fun convert(holder: BaseViewHolder, item: ClassBean) {
        holder.setText(R.id.tv_class_name, "${item.grade_name}")
        holder.setText(R.id.tv_stu, "学生：${item.studeentNum}人")
        holder.setText(R.id.tv_vip, "VIP：${item.vipstudent}人")
    }
    init {
        addChildClickViewIds(R.id.tv_report_home,R.id.tv_report_computer)
    }
}
